/* 全局样式 */
:root {
  --primary-color: #1677ff;
  --border-color: #e8e8e8;
  --background-color: #f5f5f5;
  --text-color: #333;
  --light-text-color: #666;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.5;
  color: var(--text-color);
}

.app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  color: var(--text-color);
}

/* 养老金计算器样式 */
.pension-calculator {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.calculator-header {
  background-color: var(--primary-color);
  color: white;
  padding: 20px;
  text-align: center;
}

.calculator-header h2 {
  margin: 0;
  color: white;
  font-size: 24px;
}

.calculator-header p {
  margin: 8px 0 0;
  opacity: 0.9;
}

.calculator-form {
  padding: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.form-section {
  flex: 1;
  min-width: 300px;
}

.employment-type-selector {
  margin-bottom: 20px;
}

.employment-type-selector label {
  margin-right: 20px;
  cursor: pointer;
}

.employment-type-selector input {
  margin-right: 5px;
}

/* 输入框样式 */
.input-field {
  margin-bottom: 15px;
}

.input-field label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

.input-field .unit {
  font-weight: normal;
  color: var(--light-text-color);
}

.input-field input,
.input-field select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 14px;
}

.input-field input:focus,
.input-field select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.input-note {
  margin-top: 5px;
  font-size: 12px;
  color: var(--light-text-color);
}

/* 结果显示样式 */
.result-display {
  flex: 1;
  min-width: 300px;
  background-color: var(--background-color);
  padding: 20px;
  border-radius: 4px;
}

.result-display h3 {
  margin-top: 0;
  margin-bottom: 15px;
}

.result-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--border-color);
  position: relative;
  cursor: help;
}

.result-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.result-value {
  font-weight: 600;
  color: var(--primary-color);
}

/* 图表容器样式 */
.charts-container {
  padding: 20px;
}

.chart-container {
  margin-bottom: 40px;
  background-color: white;
  border-radius: 4px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.chart-container h3 {
  margin-top: 0;
  margin-bottom: 10px;
  text-align: center;
}

.chart-subtitle {
  text-align: center;
  margin: 0 0 15px;
  font-size: 14px;
  color: var(--light-text-color);
}

.chart-description {
  text-align: center;
  margin: 0 auto 20px;
  font-size: 14px;
  color: var(--text-color);
  max-width: 90%;
  line-height: 1.6;
  background-color: #f9f9f9;
  padding: 10px 15px;
  border-radius: 4px;
  border-left: 3px solid var(--primary-color);
}

.chart-description strong {
  font-weight: 600;
  color: #333;
  background-color: #f0f0f0;
  padding: 2px 4px;
  border-radius: 3px;
}

.chart-note {
  text-align: center;
  margin: 20px 0;
  padding: 10px;
  background-color: var(--background-color);
  border-radius: 4px;
  color: var(--light-text-color);
}

/* 计算公式样式 */
.calculation-formula {
  margin-top: 10px;
  padding: 10px;
  background-color: #fff;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  font-size: 13px;
  position: relative;
  z-index: 10;
}

.calculation-formula p {
  margin: 5px 0;
  line-height: 1.4;
}

.calculation-formula p:first-child {
  color: var(--light-text-color);
  font-weight: 500;
}

.calculation-formula p:last-child {
  color: var(--primary-color);
  font-weight: 600;
}

/* 自定义Tooltip样式 */
.custom-tooltip {
  background-color: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  font-size: 13px;
}

.tooltip-label {
  margin: 0 0 5px;
  font-weight: 600;
  padding-bottom: 5px;
  border-bottom: 1px dashed var(--border-color);
  color: var(--text-color);
}

.tooltip-content p {
  margin: 3px 0;
  display: flex;
  justify-content: space-between;
  min-width: 180px;
}
